export namespace="plane-ce"
export app_name="plane-app"
export repo="makeplane"
export helm="$repo/$namespace"
export url="https://helm.plane.so/"

# 项目管理
# helm repo remove $repo
helm repo add $repo $url
helm repo update $repo

# helm search repo emqx --devel --versions

helm upgrade --create-namespace --install \
    -n $namespace $app_name $helm \
    --set planeVersion=stable \
    --set ingress.appHost="plane.youling.io" \
    --set ingress.minioHost="plane-minio.youling.io" \
    --set ingress.ingressClass=higress \
    --set postgres.storageClass=local-path \
    --set redis.storageClass=local-path \
    --set minio.storageClass=local-path \
    --timeout 10m \
    --wait \
    --wait-for-jobs

# helm install plane-app makeplane/plane-ce \
#     --create-namespace \
#     --namespace plane-ce \
#     --set planeVersion=stable \
#     --set ingress.appHost="plane.example.com" \
#     --set ingress.minioHost="plane-minio.example.com" \
#     --set ingress.ingressClass=nginx \
#     --set postgres.storageClass=longhorn \
#     --set redis.storageClass=longhorn \
#     --set minio.storageClass=longhorn \
#     --timeout 10m \
#     --wait \
#     --wait-for-jobs
